#!/bin/bash

#--system auto config variables(don't modify!)--
SUDO=""
DIR_CUR="`pwd`"

function check_root_permisson()
{
    if [ ${UID} -eq 0 ]; then
        SUDO=""
    else
        SUDO=sudo
    fi
}

# 判断用户权限,需要root用户权限
check_root_permisson
${SUDO} cp -rvf ${DIR_CUR}/fpermission.sh /usr/bin
${SUDO} chmod 755 /usr/bin/fpermission.sh
${SUDO} mkdir -p /etc/fpermission 2>/dev/null
${SUDO} cp -rvf ${DIR_CUR}/*.list /etc/fpermission
